<?php if ($all_rows > 0) : ?>
    <table class="table">
        <tbody>
        <?php $month = ''; ?>
        <?php foreach($accountRecord->result() as $key=>$value) : ?>
            <tr>
                <td class="time-month">
                    <?php if ($value->month != $month) : ?>
                        <div class="user-month">
                            <?php $month = $value->month; ?>
                            <h6><?php echo strstr($month, '-', TRUE); ?></h6>
                            <p><?php echo ltrim(strstr($month, '-'), '-'); ?></p>
                        </div>
                    <?php endif; ?>
                </td>
                <td class="time-id">
                    <h6>订单号</h6>
                    <p><?php echo $value->order_id; ?></p>
                </td>
                <td class="time-name">
                    <h6>名称</h6>
                    <p>
                        <?php
                            $type_name = '';
                            if ($value->product_type == 'hotel') {
                                $type_name = '酒店';
                            } elseif ($value->product_type == 'line') {
                                $type_name = '线路';
                            } elseif ($value->product_type == 'tourism') {
                                $type_name = '商品';
                            } elseif ($value->product_type == 'scan_code') {
                                $type_name = '景区扫码';
                            } elseif ($value->product_type == 'scenic') {
                                $type_name = '景区';
                            }
                            if ($value->type == TOURISMFREIGHT &&  $value->product_type == 'scan_code') {
                                echo $type_name, '手续费';
                            } else {
                                echo $type_name, $levelType[$value->type];
                            }
                        ?>
                    </p>
                </td>
                <td class="time-date">
                    <h6>收支时间</h6>
                    <p><?php echo $value->date; ?></p>
                </td>
                <td class="time-user">
                    <h6>支付账户</h6>
                    <p><?php echo ($value->product_type == 'scan_code') ? '扫码账户' : $accountType[$value->account_type]; ?></p>
                </td>
                <td class="time-price">
                    <h6>收支金额（元）</h6>
                    <p>
                        <?php if (in_array($value->type, array(PAY, CASH, DEDUCTION)) || ($value->amount < 0) || ($value->type == TOURISMFREIGHT &&  $value->product_type == 'scan_code') ) :?>
                            <i class="user-fasle">-<?php echo $value->amount;?></i>
                        <?php else : ?>
                            <i class="user-ture">+<?php echo $value->amount;?></i>
                        <?php endif;?>
                    </p>
                </td>
            </tr>
        <?php endforeach; ?>
        </tbody>
    </table>
    <?php $this->load->view('layout/pagination'); ?>
<?php else: ?>
    <div class="no-data">
        <img src="ucenter/images/panda.jpg"/>
        <p>没有搜索到结果</p>
    </div>
<?php endif; ?>